package com.tianruan.dc.common.auth;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @date 2019/10/13
 */
@Data
public class MAuthenticationUser extends User {

    private static final long serialVersionUID = 4899174233525700040L;

    private String id;
    private String officeId;
    private String no;
    private String name;
    private String phone;
    private String email;
    private String sex;

    public MAuthenticationUser(String username, String password,
                               Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }


    public MAuthenticationUser(String id, String officeId,String name, String username, String password,
                               String no, String phone, String email,
                               String sex, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.id = id;
        this.officeId = officeId;
        this.no = no;
        this.name = name;
        this.phone = phone;
        this.email = email;
        this.sex = sex;
    }
}